The present application generally relates to the field of computer memory management and particularly to garbage collection process for high-performance time critical applications.
With regard to computers, garbage collection refers to a process of identifying unused areas of main memory storage. In accordance with an object oriented computing language, the computer executing the program allocates memory for each of the objects. Memory is allocated to, and freed from, the heap in blocks that are sized according to application requirements. Eventually, when the objects are no longer being referenced by the program, the memory allocated for the created objects is reclaimed through a garbage collection process. The garbage collection process clears the objects from memory whereby the once allocated memory is again available for use. More particularly, a garbage collection process may involve automatically determining which blocks of memory can be freed by marking objects that are in use and reclaiming the memory of objects that are not marked. Such a garbage collection process is often referred to as a mark-and-sweep since useful portions of memory are marked as live during a mark phase, and all unmarked objects are then removed from allocated memory in a sweep phase. Although the process of garbage collection frees memory, it may be problematic in applications where its unpredictable consumption of processor time affects the running of the application.